package com.spark.check

import android.os.Bundle
import android.support.v7.widget.LinearLayoutManager
import android.view.View
import com.spark.check.model.TaskModel
import com.spark.common.BaseFragment
import kotlinx.android.synthetic.main.frag_chk_notify.*

/**
 * 标化检查通知
 */
class CheckNotifyFragment : BaseFragment() {
    private lateinit var taskAdapter: TasksAdpater

    override fun contentResId(): Int {
        return R.layout.frag_chk_notify
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        iv_back.setOnClickListener { pop() }
        taskAdapter = TasksAdpater(R.layout.item_task)
        recy_notify.adapter = taskAdapter
        recy_notify.layoutManager = LinearLayoutManager(context)

        taskAdapter.addData(mutableListOf(TaskModel.mock(), TaskModel.mock(), TaskModel.mock(), TaskModel.mock(), TaskModel.mock()))
    }

}